#include <stdio.h>
#include <unistd.h>
#include <cstdlib>

int main()
{
	printf("Executing ls\n");
	execl("/bin/ls", "ls", "-l", NULL); // use a null-terminated string to indicate the end of the args
	/* if execl return to the main function, it means that the result is failure.*/
	perror("execl failed to run ls");
	exit(1);
}
